/*
 * Wazuh Vulnerability scanner - Scan Orchestrator
 * Copyright (C) 2015, Wazuh Inc.
 * February 28, 2024.
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License (version 2) as published by the FSF - Free Software
 * Foundation.
 */

#ifndef _TRAMPOLINE_SCANCONTEXT_HPP
#define _TRAMPOLINE_SCANCONTEXT_HPP

#include "scanContext.hpp"
#include <memory>

extern std::shared_ptr<TScanContext<TrampolineOsDataCache>> spScanContext;

/**
 * @brief ScanContext structure.
 *
 * @tparam TOsDataCache os data cache type.
 */
struct TrampolineTScanContext final
{
public:
    // LCOV_EXCL_START
    /**
     * @brief Class constructor.
     *
     */
    TrampolineTScanContext() = default;
    // LCOV_EXCL_STOP

    /**
     * @brief Class constructor.
     *
     * @param data Scan context.
     */
    explicit TrampolineTScanContext(std::variant<const SyscollectorDeltas::Delta*,
                                                 const SyscollectorSynchronization::SyncMsg*,
                                                 const nlohmann::json*> data)
    {
    }

    // LCOV_EXCL_START
    /**
     * @brief Class destructor.
     *
     */
    ~TrampolineTScanContext() = default;
    // LCOV_EXCL_STOP

    /**
     * @brief Gets scan type.
     *
     * @return Scan type.
     */
    ScannerType getType() const
    {
        return spScanContext->getType();
    }

    /**
     * @brief Gets manager name.
     * @return Manager name.
     */
    std::string_view managerName() const
    {
        return spScanContext->managerName();
    }
};

#endif // _TRAMPOLINE_SCANCONTEXT_HPP
